import { request } from "@/utils/request";

export const api = {
    // 默认GET请求
    getUsers: () => request(''),

    // GET接口请求模拟
    getApi: () => request('',{
        method: 'GET'
    }),

    // POST接口请求模拟
    login: (params: any) => request('', {
        method: 'POST',
        body: params,
    }),

    // PUT接口请求模拟
    updateUser: (params: any) => request('',{
        method: 'PUT',
        body: params,
    }),

    // DELETE接口请求模拟
    deleteUser: (id: number) => request(`/api/users/${id}`,{
        method: 'DELETE',
    }),
}